package com.lavida.project.system.accumulation.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.lavida.project.system.accumulation.domain.Accumulation;
import com.lavida.project.system.accumulation.domain.Provident;

public interface AccumulationMapper {
	
	List<Accumulation> selectAccumulation();
	
	
	/**
	 * 修改公积金的规则
	 */
	@Select("select * from accumulation where id=#{id}")
	Accumulation getId(int id);
	
	/**
	 * 	更新规则
	 */
	@Update("update accumulation set companyRate=#{companyRate},personalRate=#{personalRate} where id=#{id}")
	void updateAccu(Accumulation accumulation);
	/**
	 * 	更新社保基数范围
	 */
	void updatePro(Provident provident);
	/**
	 * 	查找社保基数范围(根据id)
	 */
	@Select("select * from provident where id=#{id}")
	Provident getProId(int id);
	/**
	 * 	查找社保基数范围
	 */
	@Select("select * from provident")
	List<Provident> selectProvident();
	/**
	 *    通过id查找社保基数范围
	 * @param id
	 * @return
	 */
	@Select("select * from provident where id=#{id}")
	Provident ProselectById(Integer id);
	
	@Select("select * from accumulation where coverage=#{coverage} ")
	Accumulation selectBycoverage(String coverage);
	
}
